Situation: Host is Windows 10, Guest is CentOS 7. First make sure VirtualBox in Windows 10 has been given enough space. Then execute commands to increase the size.
vgdisplay
shows the size available to create or extend
logical volumes.lvextend /dev/mapper/centos-root -L +2G
.xfs_growfs /dev/centos/root
.df -h
to check the results.how to increase the size for /dev/mapper/centos-root?
resize2fs: Bad magic number in super-block while trying to open
-G vboxsf -a jcshi sudo usermod
Then log out and log in for it to take effects.